package ysq.xyg.model;

import lombok.Data;
import lombok.NoArgsConstructor;
import ysq.xyg.util.BaseUtil;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;

/**
 * 操作日志表
 *
 * @author shengQiang yu
 * @date 2019-03-05 15:17
 */
@Data
@NoArgsConstructor
@Table(name = "xyg_use_do")
public class UseDo implements Serializable {

    @Id
    private String id;
    /**
     *名称
     */
    private String name;
    /**
     *内容
     */
    private String content;
    /**
     *类型
     */
    private String type;
    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime;

    public UseDo(String name, String content, String type) {
        this.id= BaseUtil.uId();
        this.name = name;
        this.content = content;
        this.type = type;
        this.createTime=new Date();
    }
}